import 'package:flutter/material.dart';

class ProductPage extends StatelessWidget {
  const ProductPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text("商品页面")),
      body: Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
          ElevatedButton(
            child: Text("跳转详情页面"),
            onPressed: () {
              Navigator.pushNamed(context, '/productInfo',
                  arguments: {"pid": 456});
            },
          )
        ],
      ),
    );
  }
}
